<template>
    <div>
        猴子
    </div>
</template>
<script>
export default {
    // 组件内容守卫
    beforeRouteEnter (to, from, next) {
        // ...
        // console.log(to)
        next(that => {
            console.log(that)
        })
    },
    beforeCreate() {
        console.log(1)
    },
    created() {
        console.log(this)
    },
    beforeRouteUpdate(to, from, next) {

    },
    beforeRouteLeave (to, from, next) {
        // ...
    }
}
</script>